[USB_LIBS="`libusb-config --libs`"],
[AC_MSG_ERROR([libusb >= 0.1.8 is needed])]
)
+ # Override libusb for Darwin to reduce external
+ # runtime requirement.
+ case "$target" in
+ *-*-darwin*)
+ if test "x$ac_cv_lib_usb_usb_interrupt_read" = "xyes" ; then
+ USB_LIBS="`libusb-config --prefix`/lib/libusb.a -framework IOKit -framework CoreFoundation"
+ fi
+ esac
OSJEEPS=jeeps/gpslibusb.o
CFLAGS="$OCFLAGS"
# LIBS="$LIBS `libusb-config --libs`"
fi
- ;;
+ ;;
esac
AC_SUBST(USB_LIBS)
else
# Special case fink test.
- if test -f /sw/include/expat.h; then
- CFLAGS="$CFLAGS -I/sw/include"
- fi
- if test -f /sw/include/expat.h; then
- LDFLAGS="$LDFLAGS -L/sw/lib"
- fi
-
- AC_CHECK_LIB([expat], [XML_ParserCreate],
- AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
- [EXPAT_LIB="$LDFLAGS -lexpat"])
+ case "$target" in
+ *-*-darwin*)
+ if test -f /sw/include/expat.h -a -f /sw/include/expat.h; then
+ CFLAGS="$CFLAGS -I/sw/include"
+ LDFLAGS="$LDFLAGS -L/sw/lib"
+ # Static link against expat archive, not dyn lib.
+ AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
+ EXPAT_LIB=/sw/lib/libexpat.a
+ fi
+ ;;
+ *)
+ AC_CHECK_LIB([expat], [XML_ParserCreate],
+ AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
+ [EXPAT_LIB="$LDFLAGS -lexpat"])
+
+ ;;
+ esac
fi
AC_SUBST(EXPAT_LIB)